@include('layouts.Common.header')
<form name="actionForm" id="actionForm" class="_autoheight" method="post" autocomplete="off">
    @csrf
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right">组标识符：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" hidden name="data[category_id]"
                value="{{ $gdata['category']['id'] }}" placeholder="">
            <span type="text" class="form-control" name="data[name]"
                placeholder="">{{ $gdata['category']['sign'] }}</span>
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right"><i>*</i>名称：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" name="data[name]"
                value="{{ isset($gdata['name']) ? $gdata['name'] : '' }}" placeholder="">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right">值：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" name="data[value]"
                value="{{ isset($gdata['value']) ? $gdata['value'] : '' }}" placeholder="">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right">分组：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" name='data[groupname]'
                value="{{ isset($gdata['groupname']) ? $gdata['groupname'] : '' }}" placeholder="">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right">排序：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" name="data[sort]"
                value="{{ isset($gdata['sort']) ? $gdata['sort'] : '' }}" placeholder="">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2  col-form-label text-right">启用：</label>
        <div class="col-sm-8">
            <input type="checkbox" class="Switch" name="data[display]"
                value="{{ isset($gdata['display']) ? $gdata['display'] : '0' }}" checked data-bootstrap-switch
                data-off-color="danger" data-on-color="success">
        </div>
    </div>
    <input type="dosubmit" id="dosubmit" name="dosubmit" hidden />
</form>

{!! js() !!}
<script>
    $(function() {
        $(".Switch").bootstrapSwitch('state', $(".Switch").prop('checked'));
    })
</script>
